package com.cy.service.impl;

import com.cy.dao.AccountDao;
import com.cy.dao.impl.AccountDaoImpl;
import com.cy.factory.BeanFactory;
import com.cy.service.AccountService;

/**
 * @Author : 残影
 * @Date: 2020-09-12 11:40
 */
public class AccountServiceServiceImpl implements AccountService {
    /**
     * 此处的依赖关系有待解决
     */
    //private AccountDao accountDao = new AccountDaoImpl();
    AccountDao accountDao = (AccountDao) BeanFactory.getBean("accountDao");

    private int i = 1;

    @Override
    public void saveAccount() {
        accountDao.saveAccount();
        System.out.println(i++);
    }
}
